import request from '@/utils/request'

export const getArticle = params => request.get('/h5/interview/query', { params })

export const getShow = id => request.get('/h5/interview/show', { params: { id } })

export const likeArticle = data => request.post('/h5/interview/opt', data)

export const collectArticle = data => request.post('/h5/interview/opt', data)

// export const getCollect = params => request.get('/h5/interview/opt/list', { params })
export const getCollect = (obj) => {
  return request.get('/h5/interview/opt/list', {
    params: {
      page: obj.page, // 当前页
      pageSize: 5, // 可选
      optType: 2 // 表示收藏
    }
  })
}

// 获取我的喜欢
export const getLike = (obj) => {
  return request.get('/h5/interview/opt/list', {
    params: {
      page: obj.page, // 当前页
      pageSize: 5, // 可选
      optType: 1 // 表示喜欢
    }
  })
}
